import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  },
  {
    path: '/tiptap',
    name: 'tiptap',
    component: () => import(/* webpackChunkName: "tiptap-inndex" */ '../views/tiptap/index.vue')
  },
  {
    path: '/scroll-test',
    name: 'scroll-test',
    component: () => import(/* webpackChunkName: "scroll-index" */ '../views/scroll-test/index.vue')
  },
  {
    path: '/doc-demo',
    name: 'doc-demo',
    component: () => import(/* webpackChunkName: "doc-demo" */ '../views/doc-demo/index.vue')
  },
  {
    path: '/iframe',
    name: 'iframe',
    component: () => import(/* webpackChunkName: "iframe" */ '../views/iframe/index.vue')
  },
  {
    path: '/graphemer-test',
    name: 'graphemer-test',
    component: () => import(/* webpackChunkName: "graphemer-test" */ '../views/graphemer-test/index.vue')
  },
  {
    path: '/render',
    name: 'render',
    component: () => import(/* webpackChunkName: "render" */ '../views/render/index.vue')
  },
  {
    path: '/render2',
    name: 'render2',
    component: () => import(/* webpackChunkName: "render2" */ '../views/render2/index.vue')
  },
  {
    path: '/render3',
    name: 'render3',
    component: () => import(/* webpackChunkName: "render3" */ '../views/render3/index.vue')
  },
  {
    path: '/renderp',
    name: 'renderp',
    component: () => import(/* webpackChunkName: "renderp" */ '../views/renderp/index.vue')
  },
  {
    path: '/render4',
    name: 'render4',
    component: () => import(/* webpackChunkName: "render4" */ '../views/render4/index.vue')
  },
  {
    path: '/pm-base-editor',
    name: 'pm-base-editor',
    component: () => import(/* webpackChunkName: "pm-base-editor" */ '../views/pm-base-editor/index.vue')
  },
  {
    path: '/pm-base-editor-schema',
    name: 'pm-base-editor-schema',
    component: () => import(/* webpackChunkName: "pm-base-editor-schema" */ '../views/pm-base-editor-schema/index.vue')
  },
  {
    path: '/section',
    name: 'section',
    component: () => import(/* webpackChunkName: "section" */ '../views/section/index.vue')
  },
  {
    path: '/observe',
    name: 'observe',
    component: () => import(/* webpackChunkName: "observe" */ '../views/observe/index.vue')
  },
  {
    path: '/404',
    name: '404',
    component: () => import(/* webpackChunkName: "about" */ '../views/404/index.vue')
  },
  {
    path: '*',
    redirect: '/404'
  }
]

const router = new VueRouter({
  routes
})

export default router
